<?php if (!defined('THINK_PATH')) exit();?> <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Bootstrap Admin</title>
    <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <link rel="stylesheet" type="text/css" href="/TPproject/project/Public/Admin/Css/bootstrap.css">
    
    <link rel="stylesheet" type="text/css" href="/TPproject/project/Public/Admin/Css/theme.css">
    <link rel="stylesheet" href="/TPproject/project/Public/Admin/Css/font-awesome.css">

    <script src="/TPproject/project/Public/Admin/Js/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="/TPproject/project/Public/Admin/Js/layer.js"></script>


    <!-- Demo page code -->

    <style type="text/css">
        #line-chart {
            height:300px;
            width:800px;
            margin: 0px auto;
            margin-top: 1em;
        }
        .brand { font-family: georgia, serif; }
        .brand .first {
            color: #ccc;
            font-style: italic;
        }
        .brand .second {
            color: #fff;
            font-weight: bold;
        }
    </style>

 
    <link rel="shortcut icon" href="/TPproject/project/Public/Admin/Img/favicon.ico">
    <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/TPproject/project/Public/Admin/Img/apple-touch-icon-144-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="114x114" href="/TPproject/project/Public/Admin/Img/apple-touch-icon-114-precomposed.png">
    <link rel="apple-touch-icon-precomposed" sizes="72x72" href="/TPproject/project/Public/Admin/Img/apple-touch-icon-72-precomposed.png">
    <link rel="apple-touch-icon-precomposed" href="/TPproject/project/Public/Admin/Img/apple-touch-icon-57-precomposed.png">
  </head>
  <body class=""> 
    
    <div class="navbar">
        <div class="navbar-inner">
                <ul class="nav pull-right">
                    
                    <li><a href="#" class="hidden-phone visible-tablet visible-desktop" role="button">设置</a></li>
                    <li id="fat-menu" class="dropdown">
                        <a href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="icon-user"></i><?php echo (session('manage_name')); ?>
                            <i class="icon-caret-down"></i>
                        </a>

                        <ul class="dropdown-menu">
                            <li><a tabindex="-1" href="#">My Account</a></li>
                            <li class="divider"></li>
                            <li><a tabindex="-1" class="visible-phone" href="#">Settings</a></li>
                            <li class="divider visible-phone">...</li>
                            <li><a tabindex="-1" href="<?php echo U('Manage/logout');?>">退出</a></li>
                        </ul>
                    </li>
                    
                </ul>
                <a class="brand" href="index.html"><span class="first">Your</span> <span class="second">Company</span></a>
        </div>
    </div>
    


    

     
    
    <div class="sidebar-nav">
        <form class="search form-inline">
            <input type="text" placeholder="Search...">
        </form>

        <a href="#dashboard-menu" class="nav-header" data-toggle="collapse"><i class="icon-dashboard"></i>首页</a>
        <ul id="dashboard-menu" class="nav nav-list collapse in">
            <li><a href="index.html">Home</a></li>
                <li class="active"><a href="users.html">Sample List</a></li>
            </ul>

        <a href="#accounts-menu" class="nav-header" data-toggle="collapse"><i class="icon-briefcase"></i>管理员管理</a>
        <ul id="accounts-menu" class="nav nav-list collapse">
            <li ><a href="<?php echo u('Admin/Manager/showlist');?>">管理员列表</a></li>
        </ul>

        <a href="#error-menu" class="nav-header collapsed" data-toggle="collapse"><i class="icon-exclamation-sign"></i>Error Pages <i class="icon-chevron-up"></i></a>
        <ul id="error-menu" class="nav nav-list collapse">
            <li ><a href="403.html">403 page</a></li>
            <li ><a href="404.html">404 page</a></li>
            <li ><a href="500.html">500 page</a></li>
            <li ><a href="503.html">503 page</a></li>
        </ul>

        <a href="#legal-menu" class="nav-header" data-toggle="collapse"><i class="icon-legal"></i>Legal</a>
        <ul id="legal-menu" class="nav nav-list collapse">
            <li ><a href="privacy-policy.html">Privacy Policy</a></li>
            <li ><a href="terms-and-conditions.html">Terms and Conditions</a></li>
        </ul>

        <a href="help.html" class="nav-header" ><i class="icon-question-sign"></i>Help</a>
        <a href="faq.html" class="nav-header" ><i class="icon-comment"></i>Faq</a>
    </div>

<div class="content">
        
        <div class="header">
            
            <h1 class="page-title">管理员添加</h1>
        </div>
        
                <ul class="breadcrumb">
            <li><a href="index.html">Home</a> <span class="divider">/</span></li>
            <li><a href="users.html">Users</a> <span class="divider">/</span></li>
            <li class="active">User</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                    
<div class="btn-toolbar">
    <button class="btn btn-primary" id="submit"><i class="icon-save"></i> 提交</button>
    <!-- <a href="#myModal" data-toggle="modal" class="btn">删除</a> -->
  <div class="btn-group">
  </div>
</div>
<div class="well">
    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">Profile</a></li>
      <li><a href="#profile" data-toggle="tab">Password</a></li>
    </ul>
    <div id="myTabContent" class="tab-content">
      <div class="tab-pane active in" id="home">
    <form id="tab">
        <label>用户名</label>
        <input type="text" value="" class="input-xlarge" id="username">
        <label>昵称</label>
        <input type="text" value="" class="input-xlarge" id="nickname">
        <label>密码</label>
        <input type="text" value="" class="input-xlarge" id="password">
        <label>确认密码</label>
        <input type="text" value="" class="input-xlarge" id="passaff">
        <label>手机号码</label>
        <input type="text" value="" class="input-xlarge" id="phone">
        <label>邮箱</label>
        <input type="text" value="" class="input-xlarge" id="email">
        <label>性别</label>
        <input type="radio" value="0" name="gender" class="input-xlarge" checked="">男
        <div style="width: 50px;display: inline-block;"></div>
        <input type="radio" value="1" name="gender" class="input-xlarge">女
       <!--  <label>Address</label>
        <textarea value="Smith" rows="3" class="input-xlarge">

        </textarea> -->
        <label>Time Zone</label>
        <select name="DropDownTimezone" id="DropDownTimezone" class="input-xlarge">
          <option value="-12.0">(GMT -12:00) Eniwetok, Kwajalein</option>
        </select>
    </form>
      </div>
      <div class="tab-pane fade" id="profile">
    <form id="tab2">
        <label>New Password</label>
        <input type="password" class="input-xlarge">
        <div>
            <button class="btn btn-primary">Update</button>
        </div>
    </form>
      </div>
  </div>

</div>

<div class="modal small hide fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-header">
    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
    <h3 id="myModalLabel">Delete Confirmation</h3>
  </div>
  <div class="modal-body">
    
    <p class="error-text"><i class="icon-warning-sign modal-icon"></i>Are you sure you want to delete the user?</p>
  </div>
  <div class="modal-footer">
    <button class="btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
    <button class="btn btn-danger" data-dismiss="modal">Delete</button>
  </div>
</div>

<script type="text/javascript">

  function userblur(){
      var username = $('#username').val();
      if(username==''){
        layer.msg('账号不可为空,由8—16位英文或数字组成,开头不为数字');return false;
      }else{
        return true;
      }
  }

  function ninameblur(){
    var nickname = $('#nickname').val();
      if(nickname==''){
        layer.msg('昵称不可为空');return false;
      }else{
        return true;
      }
  }

  function passblur(){
      var password = $('#password').val();
      if(password==''){
        layer.msg('密码不可为空,由6—16位英文或数字组成');return false;
      }else{
        return true;
      }
  }

  function passaffblur(){
      var password = $('#password').val();
      var passaff = $('#passaff').val();
      if(password != passaff){
        layer.msg('两次密码不一致');return false;
      }else{
        return true;
      }
  }

  function phoneblur(){
      var phone = $('#phone').val();
      if(phone==''){
        layer.msg('手机号码不可为空且不可重复');return false;
      }else{
        return true;
      }
  }

  function emailblur(){
      var email = $('#email').val();
      if(email==''){
        layer.msg('邮箱不可为空且不可重复');return false;
      }else{
        return true;
      }
  }

  $('#username').blur(function(){
      userblur();
  })

  $('#nickname').blur(function(){
     ninameblur();
  })

  $('#password').blur(function(){
      passblur();
  })

  $('#passaff').blur(function(){
      passaffblur();
  })

  $('#phone').blur(function(){
      phoneblur();
  })

  $('#email').blur(function(){
      emailblur();
  })

  $("#submit").click(function(){
      var username = $('#username').val();
      var password = $('#password').val();
      var nickname = $('#nickname').val();
      var email = $('#email').val();
      var phone = $('#phone').val();
      var gender = $("input:radio:checked").val();
      

      //提交前确认信息无误
      if(userblur()){
        if(ninameblur()){
           if(passblur()){
              if(passaffblur()){
                if(phoneblur()){
                  emailblur();
                }
              }
           }
        }
      }
      


      $.post("",{username : username , password : password , nickname : nickname , email : email , phone : phone , gender : gender },function(data){
        
      })
  })
  
</script>

    
  
<script src="/TPproject/project/Public/Admin/Js/bootstrap.js" type="text/javascript">
    $("[rel=tooltip]").tooltip();
    $(function() {
        $('.demo-cancel-click').click(function(){return false;});
    });
</script>